﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="UC_Products.ascx.cs" Inherits="Controls_Products" %>
<div id="Breadcrumb">
    <ul>
        <li><a href="Trangchu.aspx">Trang chủ</a></li>
        <li>Sản phẩm</li>
    </ul>
</div>
<div class="main-items">
    <div class="tieude-items">
        <h4>
            Sảm phẩn mới</h4>
    </div>
    <div class="content-items">
        <ul class="list">
            <asp:ListView ID="lvProductNew" runat="server" OnItemCommand="lvProductNew_ItemCommand">
                <ItemTemplate>
                    <%--<asp:Repeater ID="rptProductNew" runat="server" OnItemCommand="rptProductNew_ItemCommand">
                <ItemTemplate>--%>
                    <li><a href='Chi-tiet-san-pham.aspx?Id=<%#Eval("Id") %>'>
                        <%--<img src='<%#Eval("Image") %>' alt="" /></a>--%>
                        <asp:Image ID="Image1" ImageUrl='<%#Eval("Image") %>' runat="server" />
                        <p class="name">
                            <%--<asp:HyperLink ID="hplTenSanPham" NavigateUrl='<%#string.Format("~/Chi-tiet-san-pham.aspx?Id={0}",Eval("Id")) %>' runat="server" ><%#Eval("Name") %></asp:HyperLink>--%>
                            <a href='Chi-tiet-san-pham.aspx?Id=<%#Eval("Id") %>'>
                                <asp:Label ID="lblTenSanPham" runat="server" Text='<%#Eval("Name") %>'></asp:Label>
                            </a>
                        </p>
                        <p class="view">
                            Lượt xem:
                            <%#Eval("View") %></p>
                        <p class="gia">
                            <asp:Label ID="lblGia" runat="server" Text='<%#Eval("Price")%>'></asp:Label>
                        </p>
                        <p class="chitiet-muahang">
                            <asp:Button ID="btnMuaHang" runat="server" UseSubmitBehavior="False" CommandName="MuaHang"
                                CausesValidation="False" CssClass="btnMuaHang" CommandArgument='<%#Eval("Id") %>' />
                            <a href='Chi-tiet-san-pham.aspx?Id=<%#Eval("Id") %>'>
                                <img alt="" src="Images/Styles/chitiet.png"></a>
                        </p>
                    </li>
                    <%--</ItemTemplate>
            </asp:Repeater>--%>
                </ItemTemplate>
            </asp:ListView>
        </ul>
    </div>
    <div class="clear">
    </div>
    <div id="paging">
            <asp:DataPager ID="DataPager1" QueryStringField="page" PageSize="8" PagedControlID="lvProductNew"
                runat="server">
                <%--<Fields>
                <asp:NumericPagerField ButtonType="Link" />
                <asp:NextPreviousPagerField ButtonType="Link" RenderNonBreakingSpacesBetweenControls="true"
                    FirstPageText="Trang đầu" LastPageText="Trang cuối" NextPageText="Tiếp theo"
                    PreviousPageText="Quay lại" ShowFirstPageButton="true" ShowLastPageButton="true"
                    ShowNextPageButton="true" ShowPreviousPageButton="true" />
            </Fields>--%>
                <Fields>
                    <asp:NextPreviousPagerField ShowFirstPageButton="True" ButtonCssClass="paging" ShowNextPageButton="False"
                        PreviousPageText="<<" />
                    <asp:NumericPagerField CurrentPageLabelCssClass="currentpage" NumericButtonCssClass="paging"
                        NextPreviousButtonCssClass="paging" />
                    <asp:NextPreviousPagerField ShowLastPageButton="True" ButtonCssClass="paging" ShowPreviousPageButton="False"
                        NextPageText=">>" />
                </Fields>
            </asp:DataPager>
        </div>
</div>

